/** \file FilterConvolution.h 
    \author belot.nicolas
	Handle Convolution
*/

#ifndef FILTERCONVOLUTION_H
#define FILTERCONVOLUTION_H 1

#include "Filter.h"
#include "Convolution.h"

namespace libtrckr {

class FilterConvolution : public Filter, public Convolution {
	/** \class libtrckr::FilterConvolution
	\brief	Handle convolution....
	*/
	public :
	/** default constructor */
	FilterConvolution();
	/** an empty convolution of the specified size*/
	FilterConvolution(int);
	/** a convolution from an array of double*/
	FilterConvolution(double* , int);
	/** a convolution from a buffer*/
	FilterConvolution(const Buffer&);
	/** copy constructor */
	FilterConvolution(const FilterConvolution&);

	/**Destructor */
	virtual ~FilterConvolution();

	void Init();
	/** tune the Convolution 
	\param conf Convolution vector*/
	void Tune(DynArray<int>);

	Buffer& Preview(Buffer &);
	double* Preview(double*,int);

	Buffer& Execution(Buffer &);
	double *Execution(double*, int);
	virtual string HowToTune();
	private :
		int start,end;
		double* convolutionW; //temporary data
		uint Wsize;
	


};

}
#endif


